import {
  getFormatterPrice
} from '@const/filter'
// 入库列表 - 表格1
export const pendingAddColumns = [{
  prop: 'orderItemCode',
  label: '采购明细单号',
  minWidth: 190,
  'show-overflow-tooltip': true
},
{
  prop: 'itemCode',
  label: '产品编码',
  'min-width': 150,
  showTooltipWhenOverflow: true
},
{
  prop: 'nameCn',
  label: '产品名称',
  'min-width': 150,
  showTooltipWhenOverflow: true
},

{
  prop: 'specification',
  label: '规格',
  width: 150,
  'show-overflow-tooltip': true
},
{
  prop: 'productType',
  label: '型号',
  width: 150,
  'show-overflow-tooltip': true
},
{
  prop: 'minUnit',
  label: '最小单位',
  width: 100
},
{
  prop: 'price',
  label: '单价(元)',
  'min-width': 150,
  formatter: row => getFormatterPrice(row.price)
},
{
  prop: 'registrationNumber',
  label: '注册证号',
  width: 170,
  'show-overflow-tooltip': true
},
{
  prop: 'manufacturer',
  label: '生产厂家',
  width: 170,
  'show-overflow-tooltip': true
},
{
  prop: 'category',
  label: '产品大类',
  width: 100,
  formatter: row => PRODUCT_CATEGORY[row.category]
},
{
  prop: 'purchaseNum',
  label: '采购数量',
  width: 110
},
{
  prop: 'detailAmount',
  label: '小计金额（元）',
  width: 170,
  formatter: row => getFormatterPrice(row.detailAmount || 0)
},
{
  prop: 'platCode',
  label: '平台产品编码',
  width: 190
},
{
  prop: 'receiveNum',
  label: '已收货数量',
  width: 110
},
{
  prop: 'awaitSendNum',
  label: '待收货数量',
  width: 110
},
{
  prop: 'sweepCount',
  label: '已扫码数量',
  width: 120,
  fixed: 'right'
},
{
  prop: 'operation',
  label: '操作',
  width: 80,
  fixed: 'right'
}
]
// 产品大类
export const PRODUCT_CATEGORY = {
  1: '高值',
  2: '低值',
  3: '试剂',
  4: '设备',
  5: '低值'
}
// 入库列表 - 表格1
export const pendingAddColumnsbox = [{
  label: '序号',
  type: 'index',
  width: 56
},
{
  prop: 'barCode',
  label: '主码',
  width: 150
},
{
  prop: 'productDate',
  label: '生产日期(11)',
  width: 120
},
{
  prop: 'expDate',
  label: '失效日期(17)',
  width: 120
},
{
  prop: 'productBatch',
  label: '批号(10)',
  width: 150
},
{
  prop: 'serialNumber',
  label: '序列号(21)',
  width: 150
},
{
  prop: 'udi',
  label: 'UDI',
  'min-width': 150
},
{
  prop: 'num',
  label: '数量',
  width: 100
}
]

// 入库操作 - 下面表头1
export const handleitemColumns = [{
  label: '序号',
  type: 'index',
  width: 56
},
{
  prop: 'barCode',
  label: '主码',
  width: 150
},
{
  prop: 'productDate',
  label: '生产日期(11)',
  width: 140
},
{
  prop: 'expDate',
  label: '失效日期(17)',
  width: 140
},
{
  prop: 'productBatch',
  label: '批号(10)',
  width: 150
},
{
  prop: 'serialNumber',
  label: '序列号(21)',
  width: 150
},
{
  prop: 'udi',
  label: 'UDI',
  'min-width': 150
},
{
  prop: 'num',
  label: '数量',
  width: 120
},
{
  prop: 'action',
  label: '操作',
  width: 100,
  fixed: 'right'
}
]
export const sweepCodeTab = [{
  lab: '待扫码',
  val: 0
},
{
  lab: '已扫码',
  val: 1
}
]

// 基本信息1
export const recordFormDetail = [
  [{
    key: 'orderCode',
    label: '采购单号'
  },
  {
    label: '关联订单号',
    key: 'purchaseCompanyId'
  },
  // {
  //   key: 'purchaseOrderCode',
  //   label: '关联订单号'
  // },
  {
    key: 'orderStatus',
    label: '订单状态'
  }
  ],
  [
    {
      key: 'createdAt',
      label: '创建时间'
    },
    {
      key: 'supplierName',
      label: '供应商'
    },
    {
      key: 'receiveAddress',
      label: '收货地址'
    }
  ],
  [
    {
      key: 'concatMan',
      label: '联系人'
    },
    {
      key: 'concatPhone',
      label: '联系电话'
    }]
]
